﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>收款匹配记录</title>
    <script src="/js/header.js"></script>
    <script src="/lib/date/wdatepicker.js"></script>
</head>
<body>
    <div class="data-wrap case" id="container">
        <div class="data-tool clearfix">
            <div class="pull-right">
                <form class="form-inline" id="formSearch">
                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">公司名称：</label>
                        <input class="form-control" name="CompanyName" type="text" />
                    </div>

                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">订单号：</label>
                        <input class="form-control" name="OrderNo" type="text" onkeyup="value=value.replace(/[^\d]/g,'')" />
                    </div>

                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">订单时间：</label>
                        <input id="d421" class="Wdate wd125" name="startTime" type="text" onfocus="WdatePicker({maxDate:'%y-%M-%d'})" />
                        --<input id="d422" class="Wdate wd125 m5_l" name="endTime" type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'d421\')}'})" />
                    </div>

                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">银行名称：</label>
                        <input class="form-control" name="ClientBankName" type="text" />
                    </div>

                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">用戶名：</label>
                        <input class="form-control" name="ClientAccountName" type="text" />
                    </div>

                    <button type="button" class="btn btn-default btn-sm active" id="btnSearch"><span class="glyphicon glyphicon-search"></span> 搜索</button>
                </form>
            </div>
        </div>
        <div class="paging">
        </div>

    </div>
    <script type="text/x-dot-template" id="templatePager">
        <div class="data-body data-scroll">
            <div class="data-view">
                <div class="data-div-view table-responsive">
                    <table class="table table-hover  table-striped table-bordered">
                        <thead>
                            <tr>
                                <th class="t_l">公司名称</th>
                                <th class="t_l wd200">订单号</th>
                                <th class="t_l wd200">商户单号</th>
                                <th class="t_l">订单时间</th>
                                <th class="t_r wd75">订单金额</th>
                                <th class="t_l">银行名称</th>
                                <th class="t_l">用户名</th>
                                <th class="t_l">银行卡号</th>
                                <th class="t_l">客户附言</th>
                                <th class="t_l">备注</th>
                            </tr>
                        </thead>
                        <tbody>
                            {{? it.tData && it.tData.length>0}}
                            {{~it.tData :item:index}}
                            <tr>
                                <td class="t_l">{{= item.companyName }}</td>

                                <td class="t_l wd200">
                                    {{? FlashPay.Util.isNullOrEmptySpance(item.matchOrderNo) && item.isShowSearch && it.statusCode=="100"}}
                                        <a class="btn btn-default btn-xs" onclick="return view(this)" data-href="/view/receipt/matchsearch.html?ID={{=item.id}}" data-title="{{= item.clientOrderNo }}-查询" data-width="900" data-height="300">查询</a>
                                    {{??}}
                                        {{= FlashPay.Util.isNullOrEmptySpance(item.matchOrderNo)?"":item.matchOrderNo }}
                                    {{?}}

                                    {{? !FlashPay.Util.isNullOrEmptySpance(item.matchOrderNo) && item.isShowAddPush && it.errorCode=="100"}}
                                        <a class="btn btn-primary btn-xs m10_l" data-confirm='"{{= item.matchOrderNo }}" <br>确定要<span class="red">补推送</span>吗？' data-href="/Receipt/AddPush?orderNo={{= item.matchOrderNo}}">补推送</a>
                                    {{?}}
                                </td>
                                <td class="t_l wd200">{{= item.clientOrderNo }}</td>
                                <td class="t_l">{{= item.depositDate.replace("T"," ") }}</td>
                                <td class="t_r bold wd75">{{= item.depositAmount }}</td>
                                <td class="t_l">{{= item.clientBankName }}</td>
                                <td class="t_l">{{= item.clientAccountName }}</td>
                                <td class="t_l">{{= FlashPay.Util.SubCardNumber(item.clientCardNumber) }}</td>
                                <td class="t_l">{{= FlashPay.Util.isNullOrEmptySpance(item.postScript)?"":item.postScript}}</td>
                                <td class="t_l">{{= FlashPay.Util.isNullOrEmptySpance(item.depositRemark)?"":item.depositRemark }}</td>
                            </tr>
                            {{~}}
                            {{??}}
                            <tr class="noRecord">
                                <td colspan="10">暂无记录！</td>
                            </tr>
                            {{?}}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <!-- 必要的分页参数设置 -->
        <input type="hidden" id="TotalCount" value="{{=it.totalCount}}" />
    </script>
    <script type="text/javascript">
        $(function () {
            FlashPay.UI.DataAutoHeight();
            setTime();
            doSearch();
            $("body").keydown(function (event) {
                if (event.keyCode == "13") {
                    doSearch();
                }
            });
            $("#btnSearch").click(function () {
                FlashPay.UI.DoSearch();
            });
        });
        function doSearch() {
            FlashPay.UI.Pager(".paging", { templateId: "templatePager", pageSize: 15, ajax: { url: '/DepositMatchRecord/GetDepositMatchRecordList' } });
        }
        //添加同级节点
        function view(obj) {
            eval(function (p, a, c, k, e, r) { e = String; if (!''.replace(/^/, String)) { while (c--) r[c] = k[c] || c; k = [function (e) { return r[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('5.6.7($(0).1("8"),{2:$(0).1("2"),3:$(0).1("3"),4:$(0).1("4")});', 9, 9, 'obj|data|title|width|height|FlashPay|UI|DialogOpen|href'.split('|'), 0, {}))
        }
        function setTime() {
            let startTime = FlashPay.Util.GetDateStr(-1);
            $("input[name='startTime']").val(startTime);
            let endTime = FlashPay.Util.GetDateStr(0);
            $("input[name='endTime']").val(endTime);
        }
    </script>
</body>
</html>